<?php
include 'D:/dingjiangbbs/common/home.php';

//var_dump($_POST);

//模糊查询出title , content
$find = $_POST['find'];
$res = select($link,DB_TABLE_DETAIL,'title,content',"where  title or content like '%$find%'");


if (!$res) {

	exit('你所输入的内容不存在');
}

//var_dump($res);
//var_dump(count($res));
//var_dump($res[0]['title']);
for ($i=0;$i<count($res);$i++) {

	echo '<h4>第&nbsp;'.($i+1).'&nbsp;条:</h4><h3 style="color:red;">'.$res[$i]['title'].'</h3>';
	echo  '<span style="color:orange;">'.$res[$i]['content'].'</span>';	
}


mysqli_close($link);